home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / TUTOR.ZIP / DEMO2.ASM < prev    next >
Assembly Source File  |  1995-01-25  |  2KB  |  32 lines

  1.      mov     ax,3                    ;reset video to text mode
  2.      int     10h                     ;= clear the screen (CLS)
  3.      mov     es,0b800h               ;set es to text video segment
  4.      call    cursof                  ;turn off blinking cursor
  5.     mov    si,message               ;message to display
  6.      mov     di,1760                 ;display at line 11 on video
  7.      mov     ah,7                    ;medium white color
  8. nex1: mov    al,cs:[si]              ;byte from code seg message
  9.      inc     si                      ;message +1
  10.      cmp     al,0                    ;end of message ?
  11.      jz      done                    ;if so, jump to done
  12.      mov     es:[di],ax              ;move byte+color to video
  13.      add     di,2                    ;next video word address
  14.      jmp     nex1                    ;do next video
  15. done: mov    ah,0            ;wait for any key pressed
  16.      int     16h                     ;keyboard interrupt
  17.      call    curson                  ;turn blinking cursor back on
  18.     mov     ax,4c00h                ;interrupt 21h exit instruct.
  19.      int     21h                     ;return to DOS> ready prompt
  20. message:
  21. db 'Captain Russell is now in command of the Starship Enterprise.',0
  22. curson: mov  ah,1                    ;set cursor type
  23.      mov     cx,0607h                ;cursor normal type
  24.      int     10h                     ;bios video interrupt
  25.      mov     dx,0                    ;set video top left  
  26.      jmp     >c1                     ;> = forward jump
  27. cursof: mov  dx,1900h                ;cursor out of view
  28. c1:  mov     ah,2                    ;set cursor position
  29.      mov     bh,0                    ;page zero in text mode
  30.      int     10h                     ;bios video interrupt
  31.      ret                             ;return to call + next
  32.